//package jdbc;
//import java.sql.Connection;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//import java.sql.Statement;
// 
///**
// * 
// * This Class elegant close mysql connection, in order to avoid conflicts
// * @author eugen
// *
// */
//public class JDBCCloser {
// 
//	/**
//	 * Closes the provided ResultSets
//	 * 
//	 * @param resultSets
//	 *            ResultSets that should be closed
//	 */
//	public static void close(ResultSet... resultSets) {
// 
//		if (resultSets == null)
//			return;
// 
//		for (ResultSet resultSet : resultSets)
//			if (resultSet != null)
//				try {
//					resultSet.close();
//				} catch (SQLException e) {
//					/* Do some exception-logging here. */
//					e.printStackTrace();
//				}
//	}
// 	/**
//	 * Closes the provided Statements
//	 * 
//	 * @param statements
//	 *            Statements that should be closed
//	 */
//	public static void close(Statement... statements) {
//		/*
//		 * No need to create methods for PreparedStatement and
//		 * CallableStatement, because they extend Statement.
//		 */
// 
//		if (statements == null)
//			return;
// 
//		for (Statement statement : statements)
//			if (statement != null)
//				try {
//					statement.close();
//				} catch (SQLException e) {
//					/* Do some exception-logging here. */
//					e.printStackTrace();
//				}
//	}
//
//	/**
//	 * Closes the provided Connections
//	 * 
//	 * @param connections
//	 *            Connections that should be closed
//	 */
//	public static void close(Connection... connections) {
//
//		if (connections == null)
//			return;
//
//		for (Connection connection : connections)
//			if (connection != null)
//				try {
//					connection.close();
//				} catch (SQLException e) {
//					/* Do some exception-logging here. */
//					e.printStackTrace();
//				}
//	}
//}
